package org.inspiration.dudu.user.util;

import org.inspiration.dudu.user.model.vo.UserVO;

public class UserContextUtil {
    private static final ThreadLocal<UserVO> userThreadLocal = new ThreadLocal<>();

    public static void setUserVO(UserVO userVO) {
        userThreadLocal.set(userVO);
    }

    public static UserVO getUserVO() {
        return userThreadLocal.get();
    }

    public static void clear() {
        userThreadLocal.remove();
    }
}
